I know this script was posted somewhere else in this forum. (It might have been Matthias). I'm just sharing it here because I copied it from wherever it was posted and just put some comments in. It will display all the modifications from every baseline of the module in a Layout DXL column. All you should have to do is change the date in the line..."Date modificationDate = "08/03/06 00:00:00"...to whatever date you want to go back to in your comparison. I generally use it for the date of the 2nd baseline of a module, since the first baseline (in my experience) has a LOT of changes as the requirements are hashed out. Also, if the module opens slowly with this DXL Layout column in a view, consider converting it to attribute DXL so it doesn't have to look through every baseline to populate that column every time you view it. Another option would be to export it to Excel, then create a text attribute to contain this information and import it back into that attribute. That way, you can run scripts to apply formatting to the text, such as "bold" to every instance of "NEW" or "OLD", to make that information stand out.
//Show ModificationsFromAllBaselines
/*
Written in DOORS 9.3.0.7, but should work in previous versions
This script will display in a Layout DXL column the
Baseline History of each object. It will display the Baseline number
and date. For Objects where the text changed between baselines, it shows both the
old value and the new value of changed objects.
*/
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Baseline B
Module m
Date modificationDate = "08/03/06 00:00:00"
Object searchObj = obj
Buffer b1 = create
Buffer b2 = create
Skip sk = create()
Date D
int count = 0
// Use a skip list to sort the baselines in reverse order
for B in current Module do put (sk, count--, B);
// put a dummy item to the skip list, so we can use the same
// loop for current module and baselines. Put it after the last one
put (sk, count , null Baseline)
// iterate through the baselines
for B in sk do {
if (!null B) {
// check if the baseline was done before the modification date
// -> no interesting history could be in there
D = dateAndTime dateOf B
if (D < modificationDate) break
// load the baseline
// print "Scanning baseline: " (major B) "." (minor B) (suffix B) " --> " D "\n"
m = load(B, false)
} else {
// load the current module
m = current Module
}
// find the object in the baseline by absolute number
int searchNr = searchObj."Absolute Number"
// first search the object using the fast object function
// won't work for non visible objects, use a 'for obj in entire m'
// loop to maybe find the object if it is null
Object targetObj = object(searchNr, m)
// if the object did not exist in the baseline then do nothing
if (null targetObj) { display "Object did not exist in baseline: " (major B) "." (minor B)"." (suffix B)
; halt }
History h
// scan the object history in the baseline
if (!null targetObj) {
for h in targetObj do {
Date historyDate = h.date
if (historyDate > modificationDate) {
if ((h.type == modifyObject) && (h.attrName == "Object Text")) {
if (!null B) {
Buffer b1 = h.oldValue
Buffer b2 = h.newValue
displayRich ("Module Baseline: " (major B) "."(minor B)"."(suffix B)", text change dated " h.date "\nOLD : " h.plainOldValue "\n" "NEW : " h.plainNewValue"\n")
}
}
}
}
}
}
delete sk